#!/bin/sh

#    Openbravo POS is a point of sales application designed for touch screens.
#    Copyright (C) 2007-2009 Openbravo, S.L.
#    http://sourceforge.net/projects/openbravopos
#
#    This file is part of Openbravo POS.
#
#    Openbravo POS is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    Openbravo POS is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with Openbravo POS.  If not, see <http://www.gnu.org/licenses/>.

DIRNAME=`dirname $0`

CP=$CP:$DIRNAME/lib/jasperreports-4.1.3.jar
CP=$CP:$DIRNAME/lib/jcommon-1.0.15.jar
CP=$CP:$DIRNAME/lib/jfreechart-1.0.12.jar
CP=$CP:$DIRNAME/lib/jdt-compiler-3.1.1.jar
CP=$CP:$DIRNAME/lib/commons-beanutils-1.7.jar
CP=$CP:$DIRNAME/lib/commons-digester-1.7.jar
CP=$CP:$DIRNAME/lib/iText-2.1.0.jar
CP=$CP:$DIRNAME/lib/poi-3.6-20091214.jar
CP=$CP:$DIRNAME/lib/barcode4j-light.jar
CP=$CP:$DIRNAME/lib/commons-codec-1.3.jar
CP=$CP:$DIRNAME/lib/velocity-1.5.jar
CP=$CP:$DIRNAME/lib/oro-2.0.8.jar
CP=$CP:$DIRNAME/lib/commons-collections-3.1.jar
CP=$CP:$DIRNAME/lib/commons-lang-2.1.jar
CP=$CP:$DIRNAME/lib/bsh-core-2.0b4.jar
CP=$CP:$DIRNAME/lib/RXTXcomm.jar
CP=$CP:$DIRNAME/lib/jpos1121.jar
CP=$CP:$DIRNAME/lib/swingx-1.6.jar
CP=$CP:$DIRNAME/lib/substance.jar
CP=$CP:$DIRNAME/lib/substance-swingx.jar

rem Apache Axis SOAP libraries.
CP=$CP:$DIRNAME/lib/axis.jar
CP=$CP:$DIRNAME/lib/jaxrpc.jar
CP=$CP:$DIRNAME/lib/saaj.jar
CP=$CP:$DIRNAME/lib/wsdl4j-1.5.1.jar
CP=$CP:$DIRNAME/lib/commons-discovery-0.2.jar
CP=$CP:$DIRNAME/lib/commons-logging-1.0.4.jar

rem ical
CP=$CP:$DIRNAME/lib/google-rfc2445.jar
CP=$CP:$DIRNAME/lib/javacsv.jar
CP=$CP:$DIRNAME/lib/jcalendar-1.3.2.jar
CP=$CP:$DIRNAME/lib/joda-time-1.6.jar
CP=$CP:$DIRNAME/lib/k5nAccordion-1.0.1.jar

rem ofsm libraries.
CP=$CP:$DIRNAME/lib/jgraph.jar

rem magallanes libraries
CP=$CP:$DIRNAME/lib/magallanes/castor-0.9.9.1-xml.jar
CP=$CP:$DIRNAME/lib/magallanes/commons-configuration-1.1.jar
CP=$CP:$DIRNAME/lib/magallanes/commons-vfs.jar
CP=$CP:$DIRNAME/lib/magallanes/jdom.jar
CP=$CP:$DIRNAME/lib/magallanes/xercesImpl.jar

CP=$CP:$DIRNAME/lib/jspf.core-1.0.0.jar
CP=$CP:$DIRNAME/51danju-core-ui.jar
CP=$CP:$DIRNAME/51danju-payment.jar
CP=$CP:$DIRNAME/51danju-core.jar
CP=$CP:$DIRNAME/e-odbo.jar
CP=$CP:$DIRNAME/e-shard.jar
CP=$CP:$DIRNAME/51danju-drivce.jar

CP=$CP:$DIRNAME/lib/fastjson-1.1.24.jar

rem erp
CP=$CP:$DIRNAME/k5ncal.jar
CP=$CP:$DIRNAME/ofsm.jar
CP=$CP:$DIRNAME/51danju-erp.jar
CP=$CP:$DIRNAME/magallanes.jar
CP=$CP:$DIRNAME/lib/prefuse.jar

rem client
CP=$CP:$DIRNAME/lib/client/hessian-4.0.7.jar

CP=$CP:$DIRNAME/locales/
CP=$CP:$DIRNAME/reports/

# start Openbravo POS
java -cp $CP -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -Djava.library.path=$DIRNAME$LIBRARYPATH -Ddirname.path=$DIRNAME/ -DMenu.Root=Menu.ERP com.openbravo.pos.forms.StartPOS "$@"
